Skip to content

feat(bitbucket): Update generator template to match pull requests#7421

Open
yermulnik wants to merge 4 commits intooxsecurity:mainfrom
yermulnik:main
Open

feat(bitbucket): Update generator template to match pull requests#7421
yermulnik wants to merge 4 commits intooxsecurity:mainfrom
yermulnik:main

Conversation

@yermulnik
Copy link

@yermulnik yermulnik commented Mar 23, 2026

Related to #7410, #7412

Details: MegaLInter requires BITBUCKET_PR_ID env variable to exist. This variable is only available on a pull request triggered builds. Therefore update generator template to trigger builds on pull requests from any branch.

Ref: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/ (look up BITBUCKET_PR_ID variable)

Fixes #7410

Proposed Changes

  1. Update Bitbucket pipeline generator template to trigger builds on pull requests from any branch.

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

Note

Low Risk
Low risk CI-template change that only affects when the generated Bitbucket pipeline triggers; no runtime or security-sensitive code paths are modified.

Overview
Updates the Bitbucket Pipelines generator template to run MegaLinter in pull-requests context for any source branch (instead of default), ensuring PR-specific env vars (e.g., BITBUCKET_PR_ID) are available for reporting.

Adds a corresponding entry to CHANGELOG.md under Reporters.

Written by Cursor Bugbot for commit ed8488f. This will update automatically on new commits. Configure here.

Related to oxsecurity#7410, oxsecurity#7412

Details: MegaLInter requires `BITBUCKET_PR_ID` env variable to exist.
This variable is only available on a pull request triggered builds.
Therefore update generator template to trigger builds on pull requests
from any branch.

Ref: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/
(look up `BITBUCKET_PR_ID` variable)
Copilot AI review requested due to automatic review settings March 23, 2026 19:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Bitbucket Pipelines generator template so MegaLinter runs in a pull-request context, where Bitbucket provides PR-specific environment variables (notably BITBUCKET_PR_ID) required for PR comment reporting.

Changes:

  • Replaces the pipelines: default trigger with a pipelines: pull-requests trigger matching all branches ("**").
  • Keeps the existing MegaLinter execution step and LLM-advisor bot detection logic under the PR pipeline.

Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bitbucket Comment Reporter] Can't figure out PR comments not posted

3 participants